/*
 * @Author: 137 '1432417996@qq.com'
 * @Date: 2025-03-24 21:10:36
 * @LastEditors: 137 '1432417996@qq.com'
 * @LastEditTime: 2025-04-27 21:42:58
 * @FilePath: \starter-3\api\auth.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { request } from '@/api/request'

// 登录
export function authLogin(data) {
    return request({
        url: '/auth/login',
        method: 'post',
        data
    })
}

// 注册
export function authRegister(data) {
    return request({
        url: '/auth/reg',
        method: 'post',
        data
    })
}

// 登录获取验证码
export function getAuthCaptcha(params) {
    return request({
        url: '/captcha/getd',
        method: 'get',
        params
    })
}

// 登录获取加密公钥
export function getPublicKey() {
    return request({
        url: '/auth/public-key',
        method: 'get',
    })
}


// 获取微信授权链接
export function getWechatAuthUrl() {
    return request({
        url: '/auth/wechat/auth-url',
        method: 'get',
    })
}

// 微信授权登录
export function getWechatAuthLogin(data) {
    return request({
        url: '/auth/wechat/login',
        method: 'post',
        data
    })
}



